home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntinc20 / resource.h < prev    next >
C/C++ Source or Header  |  1992-05-15  |  1KB  |  49 lines

  1. #ifndef _RESOURCE_H
  2. #define _RESOURCE_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. #define RLIM_INFINITY    0x7fffffffL
  13.  
  14. #define RLIMIT_CPU    1        /* max cpu time allowed */
  15. #define RLIMIT_RSS    2        /* max memory allowed (total) */
  16. #define RLIMIT_DATA    3        /* max malloc'd memory allowed */
  17. #define RLIMIT_STACK    4        /* max stack size (not used) */
  18. #define RLIMIT_FSIZE    5        /* max file size (not used) */
  19. #define RLIMIT_CORE    6        /* max core file size (not used) */
  20.  
  21. #define RLIM_NLIMITS    6
  22.  
  23. #define RUSAGE_SELF    0
  24. #define RUSAGE_CHILDREN    1
  25.  
  26. #ifndef _COMPILER_H
  27. #include <compiler.h>
  28. #endif
  29.  
  30. struct rusage {
  31.     struct timeval    ru_utime;    /* user time used */
  32.     struct timeval    ru_stime;    /* system time used */
  33. };
  34.  
  35. struct rlimit {
  36.     long rlim_cur;
  37.     long rlim_max;
  38. };
  39.  
  40. __EXTERN int    setrlimit    __PROTO((int mode, struct rlimit *rl));
  41. __EXTERN int    getrlimit    __PROTO((int mode, struct rlimit *rl));
  42. __EXTERN int    getrusuage    __PROTO((int which, struct rusage *r));
  43.  
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47.  
  48. #endif /* _RESOURCE_H */
  49.